package com.oneraku.service.utils;

import com.oneraku.service.exceptions.UnLoginException;

/**
 * @Author: hui.ren@huberbuy.com
 * @Date: 2019-07-24 14:07
 */
public class RequestIpUtils {
    private final static ThreadLocal<String> requestHolder = new ThreadLocal<String>();

    public static void add(String ip) {
        requestHolder.set(ip);
    }

    public static String getIp() {
        return requestHolder.get();
    }

    public static void remove() {
        requestHolder.remove();
    }
}
